import { axios } from "../../utils/request";

const api = {
    PageList: "/crm/customer/page",   //客户管理、联系人管理、联系记录管理动态查询
    save: "/crm/finance/save",
    detail:"/crm/finance/detail",     // 详情
    disable: "/crm/finance/disable",
    enable: "/crm/finance/enable",
    delete: "/crm/finance/delete"
};

/**
 * 动态条件查询
 * @param {*} data
 */
 export function PageList(data) {
  return axios({
    url: api.PageList,
    method: "post",
    data: data
  });
}
/**
 * 保存
 */
export function save(parameter) {
  return axios({
    url: api.save,
    method: "post",
    data: parameter
  });
}

/**
 * 详情
 */
 export function detail(data) {
  return axios({
    url: api.detail,
    method: "get",
    params: data
  });
}
/**
 * 停用
 */
export function disable(parameter) {
  return axios({
    url: api.disable,
    method: "post",
    data: parameter
  });
}

/**
 * 启用
 */
export function enable(parameter) {
  return axios({
    url: api.enable,
    method: "post",
    data: parameter
  });
}

/**
 * 删除
 */
export function deleteById(data) {
  return axios({
    url: api.delete,
    method: "post",
    data
  });
}